package com.heima.user.controller.v1;

import com.heima.model.user.pojos.ApUser;
import com.heima.user.service.ApUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Version: V1.0
 */
@RestController
@RequestMapping("/api/v1/user")
public class ApUserController {

    @Autowired
    ApUserService apUserService;

    @GetMapping("{id}")
    public ApUser findApUserById(@PathVariable("id") Integer id) {
      return apUserService.getById(id);
    }
}
